﻿using FluentNHibernate.Mapping;
using MediaSage.Lib.Database.Entities.Client;

namespace MediaSage.Lib.Database.Mappings.Client
{
    public class ThemeMap : ClassMap<ThemeEntity>
    {
        public ThemeMap()
        {
            Id(x => x.ID).GeneratedBy.GuidComb();
            Map(x => x.BuildNumber);
            Map(x => x.Location);
            Map(x => x.MajorVersion);
            Map(x => x.MinorVersion);
            Map(x => x.Name);
            Map(x => x.IsActive);
            Map(x => x.IsDefault);
            HasMany(x => x.Capability).Cascade.All().Table("ThemeCapabilities").Element("ThemeCap");
        }
    }
}